package vn.vnpay.www.VASContent;

public class MTSendSoapProxy implements vn.vnpay.www.VASContent.MTSendSoap {
  private String _endpoint = null;
  private vn.vnpay.www.VASContent.MTSendSoap mTSendSoap = null;
  
  public MTSendSoapProxy() {
    _initMTSendSoapProxy();
  }
  
  public MTSendSoapProxy(String endpoint) {
    _endpoint = endpoint;
    _initMTSendSoapProxy();
  }
  
  private void _initMTSendSoapProxy() {
    try {
      mTSendSoap = (new vn.vnpay.www.VASContent.MTSendLocator()).getMTSendSoap();
      if (mTSendSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)mTSendSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)mTSendSoap)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (mTSendSoap != null)
      ((javax.xml.rpc.Stub)mTSendSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public vn.vnpay.www.VASContent.MTSendSoap getMTSendSoap() {
    if (mTSendSoap == null)
      _initMTSendSoapProxy();
    return mTSendSoap;
  }
  
  public int sendMT(java.lang.String destination, java.lang.String sendFrom, java.lang.String keywordName, java.lang.String outContent, java.lang.String chargingFlag, java.lang.String MOSeqNo, java.lang.String totalMessage, java.lang.String contentType, java.lang.String secretCode) throws java.rmi.RemoteException{
    if (mTSendSoap == null)
      _initMTSendSoapProxy();
    return mTSendSoap.sendMT(destination, sendFrom, keywordName, outContent, chargingFlag, MOSeqNo, totalMessage, contentType, secretCode);
  }
  
  
}